cmake_minimum_required(VERSION 3.13)
project(mymuduo C CXX)

set(CMAKE_CXX_STANDARD 14)

add_executable(reactortest1 test1.cpp)
add_executable(reactortest2 test2.cpp)
add_executable(reactortest3 test3.cpp)
add_executable(reactortest4 test4.cpp)
add_executable(reactortest5 test5.cpp)
add_executable(reactortest6 test6.cpp)
add_executable(reactortest7 test7.cpp)
add_executable(reactortest8 test8.cpp)
add_executable(reactortest9 test9.cpp)
add_executable(reactortest10 test10.cpp)
add_executable(reactortest11 test11.cpp)
add_executable(reactortest12 test12.cpp)
add_executable(reactortest13 test13.cpp)
add_executable(reactortest14 test14.cpp)
add_executable(reactortest15 test15.cpp)
add_executable(reactortest16 test16.cpp)
add_executable(reactortest17 test17.cpp)
add_executable(reactortest18 test18.cpp)
add_executable(muduo main.cpp)
add_executable(Buffer_unittest Buffer_unittest.cc)

target_link_libraries(reactortest1 reactor)
target_link_libraries(reactortest2 reactor)
target_link_libraries(reactortest3 reactor)
target_link_libraries(reactortest4 reactor)
target_link_libraries(reactortest5 reactor)
target_link_libraries(reactortest6 reactor)
target_link_libraries(reactortest7 reactor)
target_link_libraries(reactortest8 reactor)
target_link_libraries(reactortest9 reactor)
target_link_libraries(reactortest10 reactor)
target_link_libraries(reactortest11 reactor)
target_link_libraries(reactortest12 reactor)
target_link_libraries(reactortest13 reactor)
target_link_libraries(reactortest14 reactor)
target_link_libraries(reactortest15 reactor)
target_link_libraries(reactortest16 reactor)
target_link_libraries(reactortest17 reactor)
target_link_libraries(reactortest18 reactor)
target_link_libraries(muduo reactor)
target_link_libraries(Buffer_unittest reactor boost_unit_test_framework)
add_test(NAME buffer_unittest COMMAND buffer_unittest)